/*
 * SerialFile.h
 *
 *  Created on: Oct 3, 2009
 *      Author: Abraham
 */

#ifndef SERIALFILE_H_
#define SERIALFILE_H_

#include <stdint.h>
#include <SerialPort.h>
#include <SerialStream.h>
#include <exception>
#include <string.h>
#include <iostream>
#include <stdio.h>

using namespace LibSerial;
using namespace std;

class SerialFile
{
public:
	// Constructor
	SerialFile(const string& file, SerialPort::BaudRate baud);
	SerialFile();

	// Destructor
	~SerialFile();

	// Methods
	void openSerialPort(const string& file, SerialPort::BaudRate baud);
	string getSerialData();
	void writeSerialData(string buffer);

private:
	SerialPort *serialPort;
	string serialPortFile;
	SerialPort::BaudRate baudRate;

};


#endif /* SERIALFILE_H_ */
